public class Test4 {
    public static void main(String[] args) {
        F1 f1 = new F3();
       // f1.name = "ku";
        if(f1 instanceof F3) {
            F3 f3 = (F3) f1;
            f3.show();
        }
    }
}
class F1{
    public String name;
    public void fun() {
        System.out.println(name + "吃东西");
    }
}
class F2 extends F1 {
    public F2() {
        super();
    }
    public String name = "hello";

    @Override
    public void fun() {
        System.out.println(super.name + "chi dong xi");
    }
}
class F3 extends F2{
    public F3() {
        super();
    }
    public void show() {
        System.out.println("F3");
    }
}



